//
//  CEILinePlot.h
//  Balance
//
//  Created by Calvin Kuo on 12-05-10.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

/*
 Status: changed
 Last Merge Date: 05-29-2012
 Last Change Date: 
 Changes:
 1. 
 */


#import <Foundation/Foundation.h>
#import "CorePlot-CocoaTouch.h"


@interface CEILinePlot : NSObject<CPTPlotDataSource,CPTPlotSpaceDelegate>
{
    @private
    CPTGraph *graph;
    CPTScatterPlot *currentPlot;
    CPTScatterPlot *priorPlot;
    CPTScatterPlot *allCollectorsPlot;
    CPTScatterPlot *rulerPlot;
    CPTPlotSpaceAnnotation *symbolTextAnnotation;
    NSMutableDictionary *dailyCEI;
    NSMutableDictionary *allCollectorsCEI;
    NSArray *dailyKeys;
    NSArray *allCollectorsKeys;
    NSMutableArray *dailyKeysInRange;
    //NSMutableArray *dailyKeysInPriorRange;
    NSMutableArray *allCollectorsKeysInRange;
   // NSArray *selectedDailyKeys;
    NSInteger totalNoOfDataPoints;
    NSInteger NoOfDataPointsInRange;
    NSInteger rulerIndex;
    NSString *rulerDateString;
    NSString *selectedDateString;
    //NSInteger selectedNumberOfPeriods;
    BOOL rangeChanged;
    BOOL allCollectorsPlotAdded;
    BOOL priorPlotAdded;
    NSString *initStartDateString;
    NSDate *initStartDate;
    BOOL rulerEnabled;
    NSMutableArray *animationStartDailyKeys;
    NSMutableArray *animationUnit;
    NSUInteger timerCount;
    NSTimer *dataTimer;
   
    
    
    
    
    
}


- (id) initWithOneCollectorData:(NSMutableDictionary *) ceiData allCollectorsData:(NSMutableDictionary *) allData;
- (void)renderInLayer:(CPTGraphHostingView *)layerHostingView withTheme:(CPTTheme *)theme;
- (void)removePlot:(NSString *)plotIdentifier;
- (void)removeRulerAnnotation;
- (void)addPlot:(NSString *)plotIdentifier;
- (void)applyRulerPlotColor;
- (void)highlightRulerPlotColor;
- (void)displayRulerAnnotation;
-(void)prepareAnimationData;


-(void)respondToRangeChangeFromDate:(NSString *)newFromDateString toDate:(NSString *)newToDateString;

@end
